<html>

<head>
<meta charset="UTF-8">
<title>请假申请</title>
</head>
<body>
	<link rel="stylesheet" type="text/css" href="/css/form.css">
	<script type="text/javascript" src="/js/apply.js"></script>
	<script type="text/javascript">
		$(".navigation span:first").text("添加申请");
	</script>
	<#include "/head.ftl"/>
	<div class="content">
		<div class="tab">
			<div class="tab-header">
				<a title="返回" class="btn btn-setting" onclick="back(this)">
					<i class="iconfont icon-undo"></i>
				</a> <a title="刷新" class="btn btn-setting" onclick="refresh(this)">
					<i class="iconfont icon-refresh"></i>
				</a> 
			</div>
			<div class="form-content">
				<form method="post" id="leaveForm">
					<fieldset>
						<table>
							<tr>
								<td>申请主题<font color="red">*</font></td>
								<td colspan="3"><input type="text" name="apply.title" placeholder="请填写申请的主题，不超过30个字符" maxlength="30" value="${(applyLeave.apply.title)?default('')}"></td>
							</tr>
							<tr>
								<td>请假时间<font color="red">*</font></td>
								<td><input type="text" name="goTime" id="start" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd', minDate: '${.now}' }) "></td>
								<td>至</td>
								<td><input type="text" name="backTime" id="end" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd', minDate:'#F{$dp.$D(\'start\')}'})"></td>
							</tr>
							<tr>
								<td>请假原因<font color="red">*</font></td>
								<td colspan="3"><input type="text" name="reason" placeholder="请填写请假原因，不超过50字" maxlength="50" value="${(applyLeave.reason)?default('')}"></td>
							</tr>
							<tr>
								<td>审批对象:</td>
								<td>
									<input id="cc1" class="easyui-combobox" data-options="valueField: 'id',editable:false,textField: 'name',url: '/user/depts/get',onSelect: function(rec){var url = '/user/dept/office/get?id='+rec.id;$('#cc2').combobox('reset');$('#cc2').combobox('reload', url);}">
									<input name="apply.deptOffice" id="cc2" class="easyui-combobox" data-options="valueField:'id',textField:'name',editable:false">
								</td>
							</tr>
							
							<tr>
								<td colspan="4" style="text-align: center;">
									<!-- <input class="button" type="submit" value="保存为草稿"> -->
									<input type="hidden" name="apply.user" value="${userinfo.id}">
									<input type="hidden" name="id" value="${(applyLeave.id)?default('')}">
									<input class="button" type="submit" value="提交">
								</td>
							</tr>
						</table>
					</fieldset>
				</form>
			</div>
		</div>

	</div>
</body>
</html>